import FileUtils as fu
import string as str

utils = fu.FileUtils
lines = utils.readLine(utils, r'D:\Users\yincy\Desktop\yin\das需求\交通\飞机票线路\\selfmaintain.txt')
acitycode = 'arrivalCityCode';
scitycode = 'startCityCode';

scitycodelist = []
acitycodelist = []
allcodelist = []
for line in lines:
    if (acitycode not in line) and (scitycode not in line):
        allcodelist.append(line)
    elif (scitycode not in line):
        scitycodelist.append(line)
    elif (acitycode not in line):
         acitycodelist.append(line)

utils.writeLine(fu, r'D:\Users\yincy\Desktop\yin\das需求\交通\飞机票线路\只缺少出发citycode缺失.txt', scitycodelist)
utils.writeLine(fu, r'D:\Users\yincy\Desktop\yin\das需求\交通\飞机票线路\只缺少到达citycode缺失.txt', acitycodelist)
utils.writeLine(fu, r'D:\Users\yincy\Desktop\yin\das需求\交通\飞机票线路\出发到达citycode缺失.txt', allcodelist)
